home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / yerk 3.66 / install.txt next >
Text File  |  1994-06-24  |  4KB  |  105 lines

  1.  
  2. In the modifications file with Yerk, I had a rather obscure reference
  3. to the install procedure. Here is a rewritten paragraph.
  4.  
  5. Install now works well. You have to think about how the application is
  6. going to work as opposed to how it worked as a development
  7. environment.  Eliminate all opennr calls (I patch the old ones [to
  8. null]), use menus in resources (see the folder supplied with Yerk
  9. sources ‘menus in resource’, don't read in a path file, and get rid of
  10. some of the unnecessary words in your development startup word. Then
  11. run the install module, setting the various words appropriately.
  12. Certain modules will load as Code resources, and you may delete those
  13. you don't need with ResEdit.  Add any other resources you need from
  14. the development resource files, and you are ready to go.
  15.  
  16. The key is to think of how a real application will work as opposed to
  17. the development document.
  18.  
  19. Taking the original startup word, yerk, from the frontend source (with
  20. line numbers):
  21.  
  22. \ system startup word
  23. 1 : yerk
  24. 2     sysInit    \ Initialize nucleus objects - fFcb, fEvent, fpRect, fWind
  25. 3     " fpInit" sFind IF drop cfa execute THEN    \ Initialize FP system
  26. 4     0 ?event drop abs: fWind call BeginUpdate
  27. 5     getVrect: fWind 14 + put: tempRect update: tempRect
  28. 6     abs: fWind call EndUpdate
  29. 7     initNewWindow: fwind show: fwind
  30. 8     <[ 2 ]> 'cfas enfW disfW setAct: fWind    \ fWind activate activities
  31. 9     OpenNR
  32. 10     new: imageName  new: parmStr
  33. 11     nPath
  34. 12     nMenu                                     \ get Yerk menu bar
  35. 13  initProcs                                \ loads a5,a3 into all :proc words
  36. 14     myDoc 2dup put: imageName title: fWind    \ fWind title bar
  37. 15     ?yerkFlgs release ;
  38. 16 
  39. 17 'c yerk -> objInit
  40.  
  41.  
  42. Here are the changes I would make:
  43.  
  44. 1. eliminate line 2, since sysinit has already done its job and the application will
  45.   store the nucleus as it is.
  46.  
  47. 2. if you use floating point, substitue line 3 with "fpInit"..just execute it, since
  48.   you know it's there.
  49.  
  50. 3. Drop the update stuff in lines 4-6 (doesn't hurt to leave them in, just unecessary)
  51.  
  52. 4. eliminate lines 7-8 for the same reason as point 1.
  53.  
  54. 5. Really eliminate line 9, since your resource file is now the resource fork
  55.   of the application. If your program has references to openNr, or your own
  56.   word to open your development resource file, patch them as:
  57.      patch openNr null
  58.      path  MyRsrcOpen null
  59.   I use resedit to copy all resources I need in an application to the rsrc fork.
  60.   This can mean the STR rsrcs from Yerk.rsrc also.
  61.  
  62. 6. Eliminate line 11, unless you want to include the npath.txt file in the yerk folder
  63.   and have the yerk folder around..If you distribute the application, you don't
  64.   want to do this. In fact, a path file for an application is unnecessary. The
  65.   user will always use the std file dialogs.
  66.  
  67. 7. Redefine 'nmenu' in line 12 to read menus from your application's resources.
  68.   For an application, you should include your menues as rsrcs. (See the example
  69.   in the folder ‘menus in resource’).  However, to test the install, you could
  70.   leave 'nmenu' alone as long as the new application resides in the yerk folder.
  71.  
  72. 8.  eliminate line 14 since there is no longer a document. The name of
  73.   the fwind is in the rsrc file.
  74.  
  75. So, the resultant startup word should look like:
  76.  
  77.  
  78. \ system startup word
  79. 1 : yerk
  80. 3     fpInit
  81. 10   new: imageName  new: parmStr
  82. 11 
  83. 12   myMenuWord                             \ get your menu bar
  84. 13   initProcs                                \ loads a5,a3 into all :proc words
  85. 14 
  86. 15   ?yerkFlgs release ;
  87. 16  
  88. 17  'c yerk -> objInit
  89.  
  90.  
  91. -----------------------
  92.  
  93. The install module is modified so that you may select those modules
  94. you want installed within your application. You may want some standard
  95. Yerk ones, your own, or none at all.
  96.  
  97.  
  98.